#pragma once

class Variable;

class CtrlSlider: public ICtrl
{
public:
	CtrlSlider(ICtrl* parent, const std::string& name);
	~CtrlSlider();

	/*-ICtrl--------------------------------------------------------------------*/
	void Draw();
	void OnLClick(const glm::vec2& where);
	void OnLDrag(const glm::vec2& where, const glm::vec2& start);
	void ReadSpecials(std::ifstream& file, const std::string& firstWord);

	/*--------------------------------------------------------------------------*/

	void BindVar(Variable* var);
	void SetRange(float min, float max);

private:
	Variable* m_var;
	std::string m_varName;
	float m_min;
	float m_max;
	float m_current;
};